package cn.wizzer.app.task.commons.ext.quartz.job;

import cn.wizzer.app.crown.modules.services.order.CrownOrderService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;


/**
 * 定时结算注单
 *
 * @author
 */
@IocBean
public class CrownJobOrderSettle implements Job {
    @Inject
    @Reference(retries = 0, timeout = 500000)
    private CrownOrderService orderService;

    private static final Log log = Logs.get();

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("定时结算开始");
        orderService.settleAuto();
        log.info("定时结算结束");
    }

}
